package com.zhny.sprinkler.irrigation.machine.rtu.plugin.model;

import com.zhny.aiot.plugin.ActionValue;
import com.zhny.aiot.plugin.PropertyValue;
import com.zhny.aiot.plugin.model.*;
import lombok.Data;

@Data
public class SprinklerRTUStoreEntry extends StoreEntity {


    @PropertyValue(alias = "喷灌机状态",description = "喷灌机状态",unit = "",icon= IconConstract.Other,variableType= VariableType.OpenCloseStop,actions={
            @ActionValue(name= Operate.Open,commandCode="sprinklerOpen",eventType= EventType.Click),
            @ActionValue(name=Operate.Close,commandCode="sprinklerClose",eventType=EventType.Click),
            @ActionValue(name=Operate.Stop,commandCode="sprinklerStop",eventType=EventType.Click),
            @ActionValue(name=Operate.Query,commandCode="sprinklerQuery",eventType=EventType.Click)
    })
    private String sprinklerStatus;

    @PropertyValue(alias = "喷灌机模式",description = "喷灌机模式",unit = "",icon= IconConstract.Other,variableType= VariableType.OpenClose,actions={
            @ActionValue(name= Operate.Open,commandCode="sprinklerModelClockwise",eventType= EventType.Click),
            @ActionValue(name=Operate.Close,commandCode="sprinklerModelAnticlockwise",eventType=EventType.Click),
            @ActionValue(name=Operate.Query,commandCode="sprinklerModelQuery",eventType=EventType.Click)
    })
    private String sprinklerModel;

    @PropertyValue(alias = "压力",description = "压力",unit = "MPa",icon= IconConstract.Other,variableType= VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check,commandCode="pressureQuery",eventType=EventType.Click)
    })
    private String pressure;

    @Override
    public String toString(){
        StringBuffer sb = new StringBuffer();
        sb.append(", sprinklerStatus=").append(this.sprinklerStatus);
        sb.append(", sprinklerModel=").append(this.sprinklerModel);
        sb.append(", pressure=").append(this.pressure);
        return sb.toString();
    }
}
